home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
RCSC.ZIP
/
LIB51
/
ISATTY.C
< prev
next >
Wrap
Text File
|
1997-01-12
|
391b
|
18 lines
/*
** Return "true" if fd is a device, else "false"
*/
isatty(fd) int fd; {
fd; /* fetch handle */
#asm
push bx ; save 2nd reg
mov bx,ax ; place handle
mov ax,4400h ; ioctl get info function
int 21h ; call BDOS
pop bx ; restore 2nd reg
mov ax,dx ; fetch info bits
and ax,80h ; isdev bit
#endasm
}